home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 266_01 / plotega.c < prev    next >
C/C++ Source or Header  |  1990-04-23  |  1KB  |  27 lines

  1. /* MicroPLOX plot routine
  2.    copyright Robert L. Patton, Jr. 15 Apr 1990
  3.    A device driver for EGA 16 color graphics.
  4.    The coordinates are ajusted to fill the screen without trying
  5.    to match the original aspect ratio exactly.
  6.    This does give a quick way to get a preview image on the screen
  7.    although text may not be exactly aligned as it would be on a
  8.    printed image.
  9.       WITH PIXLIB                              File: PLOTEGA.C
  10. */
  11. #include <stdio.h>
  12. #include <stdlib.h>
  13. #include <conio.h>
  14. #include <graph.h>
  15. #include "PLOX.H"
  16. #define DX(A) (A*5)/4   /* adjust x coordinate to fill screen */
  17. #define DY(B) (B*32)/33 /* adjust y coordinate to fill screen */
  18. #define YMAXDY   DY(YMAX)
  19. #define TVON     _setvideomode(_ERESCOLOR);
  20. #define TVOFF    _setvideomode(_DEFAULTMODE)
  21. #define DOT(A,B) _setpixel((A),(YMAXDY-B))
  22. #define NODOT(A,B) {Color=_setcolor(0); \
  23.     _setpixel((A),(YMAXDY-B));_setcolor(Color);}
  24. #define NORMAL 7  /* default chalk */
  25. #define NEWHUE(A) _setcolor((A))
  26. #include "monitor.c"
  27.